package com.lut.edu.apm.payCenter.services;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lut.edu.apm.payCenter.pojo.UserOrder;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @author Zhao Suzhen
 * @date `2024/4/17`
 */
public interface UserOrderService extends IService<UserOrder> {

    /**
     * 交易成功后修改订单状态
     * @param outTradeNo
     * @param status
     * @return
     */
    boolean modifyStatus(String outTradeNo, int status);

    /**
     * 查询今日订单量
     */
    List<Map<String, Object>> queryOrderCountByDay();

    /**
     * 查询用户订单
     * @param userId 用户id
     * @param time 查询某个时间之后的订单
     * @return
     */
    List<UserOrder> queryUserOrder(String userId, LocalDateTime time);
}
